<template>
	<page-body>
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center xxjl_flex_0_higd"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub xxjl_fd0_0_higd'>
					<view class='flex flex-wrap align-center xxjl_fd0_0_c0_higd' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  xxjl_fd0_0_c0_c0_higd'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text class='xxjl_fd0_0_c1_c0_higd'>{{$t('学习记录')}}</text>
					</view>
					<view class='flex flex-wrap align-center justify-end xxjl_fd0_0_c0_higd'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-center justify-center benben-flex-layout xxjl_flex_1_higd">
				<view class='flex flex-wrap align-center xxjl_fd1_0_higd'>
					<template v-for='(item,key0) in list'>
						<view class='flex flex-wrap align-center xxjl_fd1_0_c0_higd' :key='key0'>
							<image class='xxjl_fd1_0_c0_c0_higd' mode="aspectFill" :src='item.thumb'></image>
							<view class='flex flex-direction align-stretch flex-sub xxjl_fd1_0_c0_c1_higd'>
								<view class='flex flex-wrap align-center justify-between xxjl_fd1_0_c0_c1_c0_higd'>
									<text class='xxjl_fd1_0_c0_c1_c0_c0_higd'>{{item.course_name}}</text>
									<button class='xxjl_fd1_0_c0_c1_c0_c1_higd' @tap.stop="handleJumpDiy"
										data-type="navigateTo"
										:data-url="`/pageschool/school/xuexiye/xuexiye?type=1&course_id=${item.course_id}&name=${item.course_name}`">{{$t('重新学习')}}</button>
								</view>
								<view class='flex flex-wrap align-center xxjl_fd1_0_c0_c1_c1_higd'>
									<text class='xxjl_fd1_0_c0_c1_c1_c0_higd'>{{$t('共')}}</text>
									<text class='xxjl_fd1_0_c0_c1_c1_c0_higd'>{{item.chapter_num}}</text>
									<text class='xxjl_fd1_0_c0_c1_c1_c0_higd'>{{$t('章节')}}</text>
								</view>
								<view class='flex flex-wrap align-center xxjl_fd1_0_c0_c1_c1_higd'>
									<text class='xxjl_fd1_0_c0_c1_c1_c0_higd'>{{$t('最近学习完成：')}}</text>
									<text class='xxjl_fd1_0_c0_c1_c1_c0_higd'>{{item.create_time}}</text>
								</view>
							</view>
							<!-- <text class='xxjl_fd1_0_c0_c2_higd'    v-if= " item.is_study=='1'"  >{{$t('必学')}}</text> -->
						</view>
					</template>
					<fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
						:listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
				</view>
			</view>

			<!---flex布局flex布局结束-->


		</view>
	</page-body>
</template>
<script>
	import pagingList from '@/common/mixin/paging_list.js';
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},
		mixins: [pagingList],

		data() {
			return {
				"minixPagingListsApi": "",
				"pageingListApiMethod": "",
				"allowOnloadGetList": false,
				"list": [],
				/** pnu【分页】 **/ "pnu": 1
			};
		},
		computed: {

		},
		watch: {},
		onLoad(options) {
			this.getListFunc()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {
			this.getListFunc()
		},
		onReachBottom(e) {
			// this.pageNumFunc()
		},
		onPageScroll(e) {

		},
		methods: {
			//获取列表信息
			getListFunc() {
				this.minixPagingListsApi = global.apiUrls.post647f156ba48ec;
				this.pageingListApiMethod = 'get';
				this.allowOnloadGetList = false;
				this.pagingListPostDataContent = {
					pagesize:10,
					list_rows:10,
				}
				this.listData = [];
				this.list = this.listData;
				this.pagingListToggle();

			},
			//触底刷新
			pageNumFunc() {
				this.pnu++
				this.getListFunc()
			},
			pagingListPostData() {
				return this.pagingListPostDataContent
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #fff;
		background-size: 100% auto;

		.xxjl_flex_1_higd {
			margin: 32rpx 0rpx 0rpx 0rpx;

			.xxjl_fd1_0_higd {
				width: 100%;
				padding: 0rpx 24rpx 0rpx 24rpx;

				.xxjl_fd1_0_c0_higd {
					margin: 0rpx 0rpx 32rpx 0rpx;
					height: 192rpx;
					width: 100%;
					border-radius: 16rpx 16rpx 0rpx 0rpx;
					padding: 0rpx 0rpx 32rpx 0rpx;
					position: relative;

					.xxjl_fd1_0_c0_c0_higd {
						width: 258rpx;
						height: 160rpx;
						border-radius: 16rpx;
					}

					.xxjl_fd1_0_c0_c1_higd {
						margin: 0rpx 0rpx 0rpx 24rpx;
						height: 100%;

						.xxjl_fd1_0_c0_c1_c0_higd {
							height: 50rpx;
							margin: 0rpx 0rpx 10rpx 0rpx;

							.xxjl_fd1_0_c0_c1_c0_c0_higd {
								color: rgba(51, 51, 51, 1);
								font-weight: 700;
								-webkit-line-clamp: 1;
								overflow: hidden;
								text-overflow: ellipsis;
								display: -webkit-box;
								-webkit-box-orient: vertical;
							}

							.xxjl_fd1_0_c0_c1_c0_c1_higd {
								border-radius: 33rpx 33rpx 33rpx 33rpx;
								width: 120rpx;
								line-height: 48rpx;
								font-size: 22rpx;
								background: #fff;
								color: rgba(204, 34, 28, 1);
								height: 48rpx;
								border: 1px solid rgba(204, 34, 28, 1);
							}
						}
					}

					.xxjl_fd1_0_c0_c2_higd {
						font-size: 20rpx;
						width: 60rpx;
						text-align: center;
						border-radius: 6rpx;
						color: var(--benbenFontColor3);
						background: #cc221c;
						background-size: 100% auto;
						position: absolute;
						top: 0rpx;
						left: 0rpx;
					}
				}
			}
		}

		.xxjl_fd1_0_c0_c1_c1_higd {
			height: 50rpx;
		}

		.xxjl_fd1_0_c0_c1_c1_c0_higd {
			font-size: 24rpx;
			color: rgba(99, 99, 99, 1);
		}

		.xxjl_flex_0_higd {
			width: 750rpx;
			height: 88rpx;
			overflow: hidden;
			z-index: 10;
			top: 0rpx;
			background: #fff;
			background-size: 100% auto !important;
			border-bottom: 1px solid rgba(238, 238, 238, 1);

			.xxjl_fd0_0_higd {
				padding: 0rpx 32rpx 0rpx 32rpx;

				.xxjl_fd0_0_c1_c0_higd {
					font-size: 36rpx;
					font-weight: 700;
					color: #333333;
					line-height: 50rpx;
				}
			}
		}

		.xxjl_fd0_0_c0_higd {
			width: 120rpx;

			.xxjl_fd0_0_c0_c0_higd {
				font-size: 36rpx;
				color: #333;
			}
		}
	}
</style>
